<template>
    <button class="button" :style="`width:${size}px;height:${size}px;`">
        <span class="X" :style="`width:${xySize}px`"></span>
        <span class="Y" :style="`width:${xySize}px`"></span>
    </button>
</template>

<script setup>
import { computed } from 'vue';

// ========================= 接收值 =========================
const props = defineProps({
    size: {
        type: Number,
        default: 20
    }
})

// ========================= 计算属性 =========================
const xySize = computed(() => parseInt(props.size/2))
</script>

<style lang="scss" scoped>
    @import './close.scss';
</style>